package org.gdpu.model;

import javax.persistence.*;

/**
 * 试卷题目
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 13-6-8
 * Time: 下午9:56
 * To change this template use File | Settings | File Templates.
 */

@Entity
public class TestPaper {
    /**
    系统主键
     */
    private int id;
    /**
   试卷编号
   说明：试卷编号一样代表同一份试卷里的题目，同时可根据生成时间产生一个批号
    */
    private TestPaperInfo testPaperInfo;
    /**
    试题
     */
    private Test test;
    /**
    题目分值
     */
    private float score;
    /**
   难度
    */
    private double difficulty;

    @Id
    @GeneratedValue
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }


    @ManyToOne
    @JoinColumn(name = "testPaperId")
    public TestPaperInfo getTestPaperInfo() {
        return testPaperInfo;
    }

    public void setTestPaperInfo(TestPaperInfo testPaperInfo) {
        this.testPaperInfo = testPaperInfo;
    }


    public double getDifficulty() {
        return difficulty;
    }

    public void setDifficulty(double difficulty) {
        this.difficulty = difficulty;
    }

    public float getScore() {
        return score;
    }

    public void setScore(float score) {
        this.score = score;
    }

    @ManyToOne
    @JoinColumn(name = "themeId")
    public Test getTest() {
        return test;
    }

    public void setTest(Test test) {
        this.test = test;
    }

}
